package com.hu.green.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hu.green.entity.Garden;
import com.hu.green.mapper.GardenMapper;
import com.hu.green.service.GardenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GardenServiceImpl extends ServiceImpl<GardenMapper, Garden> implements GardenService {

    @Autowired
    private GardenMapper gardenMapper;
    public List<Garden> get(String account){

        LambdaQueryWrapper<Garden> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Garden::getAccount,account);
        List<Garden> list = gardenMapper.selectList(queryWrapper);

        return list;
    }
}
